import java.util.Scanner;

/**
 * 用户服务
 *
 * @author yuwei
 * @date 21:13 2024/4/24
 */
public class claimManage {
    public static void change() {
        System.out.println("--报销--");
        System.out.println("姓名");
        Scanner scan = new Scanner(System.in);
        String title = scan.next();
        System.out.println("报效金额");
        int money = scan.nextInt();
        claimTable.claims.add(new claim(money, title));
        System.out.println("报效成功");
    }

    public static void show() {
        System.out.println("        报销明细          ");
        System.out.println("-----------------------");
        if(claimTable.claims.size()==0){
            System.out.println("    无任何数据 ");
            return;
        }
        claimTable.claims.forEach(i -> System.out.println(i));
    }


    public static void menu() {
        System.out.println("---报销管理----");
        System.out.println("1.查看账单");
        System.out.println("2.报销");
        System.out.println("3.返回");
        Scanner scanner = new Scanner(System.in);
        switch (scanner.nextInt()) {
            case 1:
                show();
                menu();
                break;
            case 2:
                change();
                menu();
                break;
            case 3:
                system.finance();
            default:
                System.out.println("输入错误");
                menu();
        }
    }

}
